home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / wndwc20.zip / EX12.C < prev    next >
Text File  |  1989-03-06  |  2KB  |  34 lines

  1. /*     EXAMPLE 12:  Updating covered windows automatically
  2.      ----------------------------------------------------------------------*/
  3.      #include <conio.h>
  4.      #include <dos.h>
  5.      #include "wndwc20.h"
  6.  
  7.      void main()
  8.      {
  9.          qinit();
  10.          initwindow( LIGHTGRAY_BG, 1, 0 );
  11.          setwindowmodes( VIRTUALMODE );
  12.          setvirtualsize( 20, 100 );              /* 20 rows by 100 columns */
  13.          makewindow( 5, 20, 15, 40, LIGHTCYAN+BLUE_BG, WHITE+BLUE_BG,
  14.                      SINGLE_BORDER, WINDOW1 );
  15.          setwindowmodes( 0 );                    /* Back to default modes. */
  16.          makewindow( 7, 30, 16, 18, WHITE+GREEN_BG, GREEN_BG, DOUBLE_BORDER,
  17.                      WINDOW2 );
  18.          delay( 2000 );           /* Make sure we see where the cursor is. */
  19.          writetovirtual( WINDOW1 );     /* Now write to the virtual screen */
  20.          qfill(1,1,crt_rows,crt_cols,SAMEATTR,'?');  /* Fill screen w/data */
  21.          titlewindow( TOP, LEFT, YELLOW+BLUE_BG, " Virtual Window " );
  22.          wwrite( 4, 8, " >" );                  /* Let's get our bearings. */
  23.          qwriteeos( tws.wndwattr+BLINK, "+" );
  24.          qwriteeos( SAMEATTR, "<- Row 4, Column 10 " );
  25.          vviewrc( 4, 10 );
  26.          vupdatewindow();        /* Update the complete window on the CRT. */
  27.          delay( 1000 );
  28.          removewindow();
  29.          delay( 2000 );           /* Make sure we see where the cursor is. */
  30.          removewindow();
  31.          getch();
  32.      }
  33.  
  34.